package LanQiao.jichu;

import java.util.Scanner;

//报时助手
public class BASIC_26 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int h = s.nextInt();
        int m = s.nextInt();
        //这里存储0-20
        String[] str = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen", "twenty"};
        //注意这里不仅要存储，30，40，50，还要存储20，因为有20-30之间的数
        String[] strs = {"twenty","thirty", "forty", "fifty"};
        String a, b;
        if (h <= 20) {
            //当小时小于二十时
            a = str[h];
        } else {
            //当小时大于20时，h最大为24
            int i = h - 20;
            a = str[20] + " " + str[i];
        }
        if (m == 0) {
            //当m为0时
            b = "o'clock";
        } else if (m <= 20) {
            //当m小于20时
            b = str[m];
        } else {
            //当m大约二十时，先计算出其十位数为几
            int i = (m - 20) / 10;
            if (m % 10 == 0) {
                //当m大约二十且个位为0时，只需要输入其十位数
                b = strs[i];
            } else {
                //当m大约二十且个位不为0时，需要输入十位数加个位数
                int j = m % 10;
                b = strs[i] + " " + str[j];
            }
        }
        System.out.println(a + " " + b);
    }
}
